import { request } from "@/utils/request.js";

/** 忘记密码API */
export function forgetPassWord(data) {
  return request({
    url: "/auth/forgot-password",
    method: "post",
    data,
  });
}

/** 登录API */
export function userLogin(data) {
  return request({
    url: "/auth/local",
    method: "post",
    data,
  });
}

/** 注册API */
export function userRegister(data) {
  return request({
    url: "/auth/local/register",
    method: "post",
    data,
  });
}

/** 重置密码API */
export function resetPassword(data) {
  return request({
    url: "/auth/reset-password",
    method: "post",
    data,
  });
}

/** 获取用户信息API */
export function getUserInfo(data) {
  return request({
    url: "/users/me",
    method: "get",
  });
}
